<template>
  <div>
    <el-container>
      <!-- 侧边栏 -->

      <el-aside width="200px">
        <div class="logo">
          <!-- <img src="images/logo.png" width="122.5" alt="" /> -->
          <img :src="logo" alt="" style="width: 150px; height: 60px" />
        </div>
       <!-- 上线申请 -->
        <el-menu>
          <!-- 商家管理 -->
          <el-menu-item index="1">
            <i class="el-icon-menu"></i>
            <router-link to="/business/list">
              商家列表
            </router-link>
          </el-menu-item>
          <el-menu-item index="2">
            <i class="el-icon-menu"></i>
            <router-link to="/apply/list">
              申请上线
            </router-link>
          </el-menu-item>
        </el-menu>
      </el-aside>

      <el-container>
        <el-header style="text-align: right; font-size: 12px">
          <el-dropdown>
            <i class="el-icon-setting" style="margin-right: 15px"></i>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>
                <router-link to="/center">
                  用户中心
                </router-link>
              </el-dropdown-item>
              <el-dropdown-item>
                <router-link to="/login">
                  退出登录
                </router-link>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          <span>{{$store.getters.getUser.name}}</span>
        </el-header>

        <el-main>
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
  export default {
    name: "AdminMain",
    data(){
      return {
        logo: require("@/views/img/cake.jpg")
      }
    },
    mounted() {
      this.$router.push({
        name: 'BusinessList'
      })
    }
  }
</script>


<style scoped>
  *{
    text-decoration: none;
    color: #000000;
  }
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }

  .el-aside {
    color: #333;
  }
</style>
